package com.daoliuhe.scaffold.mapper;

import com.daoliuhe.scaffold.model.User;
import com.daoliuhe.scaffold.model.UserGroupUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface UserGroupUserMapper {
    int deleteByPrimaryKey(BigDecimal id);

    int insert(UserGroupUser record);

    int insertSelective(UserGroupUser record);

    UserGroupUser selectByPrimaryKey(BigDecimal id);

    int updateByPrimaryKeySelective(UserGroupUser record);

    int updateByPrimaryKey(UserGroupUser record);

    List<UserGroupUser> select(UserGroupUser ugu);

    int getUserPageCount(UserGroupUser ugu);

    /**
     * 根据条件用户组用户分页
     * @return
     */
    List<User> getUserPageData(UserGroupUser ugu);
    /**
     * 根据id删除用户组用户
     * @return
     */
    void deleteUser(@Param("userIds") List<String> list, @Param("userGroupId") String userGroupId);

    /**
     * 删除用户的用户组
     * @return
     */
    void deleteUserGroupForUser(@Param("userId") String userId, @Param("userGroupIds") List<String> list);
}